package com.four.service.impl;

import com.four.dao.StaffMapper;
import com.four.pojo.*;
import com.four.service.IStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service("staffService")
public class StaffService implements IStaffService {
    @Autowired
    @Qualifier("staffMapper")
    private StaffMapper staffMapper;
    @Override
    public List<Staff> findAllStaff() {
        return staffMapper.findAllStaff();
    }

    @Override
    public List<Staff> findZz() {
        return staffMapper.findZz();
    }

    @Override
    public List<Staff> findLz() {
        return staffMapper.findLz();
    }

    @Override
    public int addStaff(Staff staff) {
        Date date = new Date();
        System.out.println(date);
        staff.setS_time(date);
        return staffMapper.addStaff(staff);
    }

    @Override
    public int updateStaff(Staff staff) {
        return staffMapper.updateStaff(staff);
    }

    @Override
    public Staff findByIdStaff(int staff_id) {
        return staffMapper.findByIdStaff(staff_id);
    }

    @Override
    public Staff findByIdS(int staff_id) {
        return staffMapper.findByIdS(staff_id);
    }

    @Override
    public List<Product> findAllProduct1(Integer staff_id) {
        return staffMapper.findAllProduct1(staff_id);
    }

    @Override
    public List<com.four.pojo.Service> findAllService2(Integer staff_id) {
        return staffMapper.findAllService2(staff_id);
    }

    @Override
    public int updateService(com.four.pojo.Service service) {
        return staffMapper.updateService(service);
    }


    @Override
    public List<Card> findAllCard3(Integer staff_id) {
        return staffMapper.findAllCard3(staff_id);
    }

    @Override
    public List<Card> findAllNewscard4(Integer staff_id) {
        return staffMapper.findAllNewscard4(staff_id);
    }

    @Override
    public int updateNewscard(Card card) {
        return staffMapper.updateNewscard(card);
    }

    @Override
    public int updateCard(Card card) {
        return staffMapper.updateCard(card);
    }

    @Override
    public int updateZService(com.four.pojo.Service service) {
        return staffMapper.updateZService(service);
    }

    @Override
    public int updateZProduct(Product product) {
        return staffMapper.updateZProduct(product);
    }

    @Override
    public int updateZCard(Card card) {
        return staffMapper.updateZCard(card);
    }

    @Override
    public int updateZNewscard(Card card) {
        return staffMapper.updateZNewscard(card);
    }

    @Override
    public Staff findByIdS2(FIndstaff_TC fIndstaff_tc) {
        return staffMapper.findByIdS2(fIndstaff_tc);
    }

    @Override
    public List<Product> findAllProduct12(FIndstaff_TC fIndstaff_tc) {
        return staffMapper.findAllProduct12(fIndstaff_tc);
    }

    @Override
    public List<com.four.pojo.Service> findAllService22(FIndstaff_TC fIndstaff_tc) {
        return staffMapper.findAllService22(fIndstaff_tc);
    }

    @Override
    public List<Card> findAllCard32(FIndstaff_TC fIndstaff_tc) {
        return staffMapper.findAllCard32(fIndstaff_tc);
    }

    @Override
    public List<Card> findAllNewscard42(FIndstaff_TC fIndstaff_tc) {
        return staffMapper.findAllNewscard42(fIndstaff_tc);
    }


}
